﻿using HamcoWcs.Entitys.RoleMenus;
using HamcoWcs.Models.Common;
using HamcoWcs.Models.ForeEndModels.LoginInfos;
using HamcoWcs.Models.ForeEndModels.MenuInfos;
using HamcoWcs.Models.ForeEndModels.RoleInfos;
using HamcoWcs.Models.ForeEndModels.UserInfos;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace HamcoWcs.Contract.ContractForeEnd
{
    public interface IManageService : IForeEndBaseService
    {
        LoginResult Login(LoginInfo loginInfo);
        void Logout(string userName);

        #region  User
        bool AddUser(UserInfoDto userInfoDto);
        bool UpdateUser(UserInfoDto userInfoDto);
        bool DeleteUser(List<DeleteUserInfo> deleteUserInfos);
        ForeEndResult QueryUser(QueryUserInfo query);
        UserInfoDto GetUserByName(string userName);
        List<MenuInfoDto> GetMenuByUserId(long UserId);

        #endregion

        #region Role
        bool AddRole(RoleInfoDto roleInfoDto);
        bool UpdateRole(RoleInfoDto roleInfoDto);
        bool DeleteRole(IEnumerable<long> ids);
        ForeEndResult QueryRole(QueryRoleInfo query);
        //Task<MenuInfoResult> GetMenuByRoleId(long RoleId);
        bool AddRoleMenu(RoleMenu roleMenu);
        bool DeleteRoleMenu(RoleMenu roleMenu);

        #endregion

        #region Menu
        bool AddMenu(MenuInfoDto menuInfoDto);
        bool UpdateMenu(MenuInfoDto menuInfoDto);
        bool DeleteMenu(IEnumerable<long> ids);
        MenuInfoResult QueryMenu();
        #endregion

    }
}
